#include "IEngineComponentCollection.h"
#include "IEngineComponent.h"

IEngineComponentCollection::IEngineComponentCollection(void)
{
}

IEngineComponentCollection::~IEngineComponentCollection(void)
{
}

void IEngineComponentCollection::push_back(const EnginePointer<IEngineComponent>& component)
{
	list<EnginePointer<IEngineComponent>>::push_back(component);
	idMap[component->getId()] = component;
}

void IEngineComponentCollection::push_front(const EnginePointer<IEngineComponent>& component)
{
	list<EnginePointer<IEngineComponent>>::push_front(component);
	idMap[component->getId()] = component;
}

EnginePointer<IEngineComponent> IEngineComponentCollection::getComponentFromId(long long int id)
{
	return idMap[id];
}